public class ClientClass {
    public static void main(String[] args) {
        Mediator mediator = new FruitMediator();

        // 通过中介者获取水果
        Fruit fruit1 = mediator.requestFruit("A");
        fruit1.eat();  // 输出 eat Apple

        Fruit fruit2 = mediator.requestFruit("B");
        fruit2.eat();  // 输出 eat Banana
    }
}